package cn.javass.dp.chianofresponsibility.mydemo3;

public class Client {

    // 假如规定学生请假小于或等于 2 天，班主任可以批准；小于或等于 7 天，系主任可以批准；小于或等于 10 天，院长可以批准；其他情况不予批准。

    public static void main(String[] args) {
        ClassAdviser classAdviser = new ClassAdviser();
        DepartmentHead departmentHead = new DepartmentHead();
        Dead dead = new Dead();
        classAdviser.setSuccessor(dead);
        dead.setSuccessor(departmentHead);
        classAdviser.handleRequest(10);

    }
}
